<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>数字求和</title>
</head>
<body>
  <script>
    //输入
    let a = Number(prompt("请输入数字1:"))
    let b = +(prompt("请输入数字2:"))
    //相加
    alert(`相加结果为:${a + b}`)
    console.log(`相加结果为:${a + b}`)
  </script>
</body>
</html>